POV-Ray : Newsgroups : moray.win : Media Woes : Re: Media Woes Server Time
28 Jul 2024 14:32:37 EDT (-0400)
  Re: Media Woes  
From: How Camp
Date: 10 Jul 2000 19:31:16
Message: <396a5cc4@news.povray.org>
Hmm.  Forgive me for being rather dense...  Here is and example, using a
sphere:

#declare Test_Texture =
   material


      texture


         pigment
         {
            color rgbt <1.0, 1.0, 1.0, 1.0>
         }
      }
      interior
      {
         media
         {
            emission rgb <1.0, 0.0, 0.0>
            density
            {
               granite
               color_map
               {
                  [ 0.0     rgbft <0.0, 0.0, 0.0, 0.0, 0.0> ]
                  [ 1.0     rgbft <1.0, 1.0, 1.0, 0.0, 0.0> ]
               }
               scale  10.0   // *** Added scaling ***
            }
         }
      }
   }

(This is directly from Moray, with only the comment added above.)

If I create a unit sphere (as Ryan suggested) and apply the texture, it
looks great (without the "scale 10.0" line).  Then, I scale the sphere, say
to 0.1, and scale the density (as Bob suggested) to 10, then the media tends
to disappear.  Leaving the texture as-is and scaling only the object is also
ineffective.

Now, if I understand both of you correctly, it would be better to create my
object as a unit-sized object, and then scale it later.  But, is this not
what Moray does?  I have a basic sphere that is then scaled/translated after
the texture has been applied.

Bob, you also mention adding the scaling at the end of the objects statement
block.  I see how this could be done by hand, but is there an equivalent in
Moray?

Apologies for misunderstanding you both.  Still learning Moray.  Thanks for
the help!

- How

ryan constantine <rco### [at] yahoocom> wrote in message
news:396A531B.BCA88C91@yahoo.com...

> oh, i forgot one other thing.  it is better to have your object defined
> as a unit sixed object and then to scale it.  media works better that
> way.  ex. i had a unit sphere where my media was spherical in density.
> i then scaled my sphere and the media accordingly with no problem.  one
> other thing i do when scaling is to scale in small steps doing a test at
> each step to make sure that each is what i expect.

> Bob Hughes wrote:

> Don't scale the media overall or you'll get a different pattern size,  so
> scale either the emission (absorption too) or density or scattering.
> Also, if you start with a container size larger or smaller than unit-size
the
> media will not fill it in the usual way.  It will become thinned out from
> either a lack of distance or too much distance for the samples to be
checked
> through.  You should use scaling of the container+media at the end of the
> objects statement block instead.
> Scaling of the densities might prove difficult if there are many indexed
or
> are in separate density statements used in a density map.
> I think you should be able to get a reasonable media through scaling in
that
> way.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.